package com.qidian.buy.config;

import com.alibaba.druid.pool.DruidDataSource;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.sql.DataSource;

/**
 * @author 戴着假发的程序员
 * @company 起点编程
 * @date 2023/8/18 13:48
 */
@Configuration
public class DruidConfig {
    @Bean
    @ConfigurationProperties(prefix = "druid")
    public DataSource dataSource(){
        return new DruidDataSource();
    }
}
